package indi.zhifa.study2024.nbr.monitor.gen.monitor.user.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import indi.zhifa.core.mpenhance.entity.annotations.ZfDbService;
import indi.zhifa.study2024.nbr.monitor.gen.monitor.user.po.GenMonitorUserEntity;
import indi.zhifa.study2024.nbr.monitor.gen.monitor.user.mapper.GenMonitorUserMapper;
import indi.zhifa.study2024.nbr.monitor.gen.monitor.user.service.IGenMonitorUserDbService;
import indi.zhifa.core.mpenhance.service.impl.ZfDbServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 用户表 服务实现类
 * </p>
 *
 * @author 织法
 * @since 2024-11-02
 */
@ZfDbService(name="GenMonitorUserEntity")
public class GenMonitorUserDbServiceImpl extends ZfDbServiceImpl<GenMonitorUserMapper, GenMonitorUserEntity> implements IGenMonitorUserDbService {

    @Override
    public GenMonitorUserEntity findByUserName(String userName) {
        LambdaQueryWrapper<GenMonitorUserEntity> lambdaQueryWrapper = Wrappers.<GenMonitorUserEntity>lambdaQuery()
                .eq(GenMonitorUserEntity::getUserName, userName);
        return findOne(lambdaQueryWrapper);
    }
}
